﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PJB.FacetedNavigation;
using PJBWebsite.Objects;

namespace PJBWebsite.UserControls
{
    public partial class ListingItemControl : System.Web.UI.UserControl
    {
        public void Populate(ListingItem item)
        {
            lblDescription.Text = item.Description;

            lblTitle.Text = "<a href=\"/detail.aspx?id=" + item.JobID + "\">" + item.Position_type + " " + item.Specialty + " Job in " + item.State + "</a>";
            lblState.Text = item.State;
            lblTopRow.Text = "<div class=\"date\">"+item.PostDate.Value.ToString("MMM dd, yyyy")+"</div><div class=\"detailcelltop\"><div><span class=\"detailcellattention\">" + item.Specialty + "</span> | <span class=\"detailcellnormal\">" + item.Position_type + "</div></div>";
        }
    }
}